package com.hou.serviceorder1.serviceorder;

import com.hou.serviceorder1.serviceorder.po.Order;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class OrderController {

    @GetMapping("/name")
    public String getOrderName(){
        return "order";
    }


    @GetMapping("/order")
    public Order getOrder(String id){
        return new Order(id,"侯征");
    }

    @PostMapping("/insert")
    public Order insertOrder(@RequestBody Order order){
        return order;
    }
}
